#include <stdio.h>

int main()
{ 
    int a = 0, n = 0;
    int sum=0;
    int b=0;
    
    printf("xx b:%d sum:%d\n",b,sum);
    
    printf("清输入一个1-9的整数：");
    scanf("%d",&a);
    printf("请输入几个数相加：");
    scanf("%d",&n);
    
    for(int i=0;i<n;i++)
    {
        b=b*10+a;
        sum+=b;
        printf("b:%d sum:%d\n",b,sum);
    }
    printf("%d",sum);
    
    return 0;
} 